package com.jeeinc.oa.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeinc.oa.dao.IBannerDao;
import com.jeeinc.oa.domain.Banner;
import com.jeeinc.oa.model.Pager;
import com.jeeinc.oa.service.IBannerService;

@Service
@Transactional
public class BannerServiceImpl implements IBannerService {
	@Resource
	private IBannerDao bannerDao;

	@Override
	public Banner getBanner(Integer id) {
		return bannerDao.get(id);
	}

	@Override
	public void saveBanner(Banner banner) {
		bannerDao.save(banner);
	}

	@Override
	public void updateBanner(Banner banner) {
		bannerDao.update(banner);
	}

	@Override
	public void deleteBanner(Banner banner) {
		bannerDao.delete(banner);
	}

	@Override
	public void deleteBanner(Integer portletId) {
		bannerDao.delete(getBanner(portletId));
	}

	@Override
	public Pager list(Pager pager) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Banner> list(Integer portletId) {
		// TODO Auto-generated method stub
		return null;
	}

}
